package chamster.statemachine;

import java.util.LinkedList;
import java.util.List;

import chamster.BaseHamster;

public class DEAMachine<HamsterType extends BaseHamster> implements StateMachine<HamsterType> {
	
	public HamsterState<HamsterType> run(HamsterType hamster, HamsterState<HamsterType> state) throws Exception {
		List<HamsterState<HamsterType>> newStates = 
				state.applyState(new LinkedList<HamsterState<HamsterType>>(), hamster);
		return newStates.get(0);
	}
}
